<!DOCTYPE html> {% load blog_tags %}
<html class="borderbox">

<head>
    {% load staticfiles %}
    <title> 我Accelerator </title>
    <!-- meta -->
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="{% static 'img/icon.ico' %}" type="image/x-icon" />
    <!-- css -->
    <link rel="stylesheet" href="{% static 'blog/css/bootstrap.min.css' %}">
    <link rel="stylesheet" href="http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
    <link rel="stylesheet" href="{% static 'blog/css/pace.css' %}">
    <link rel="stylesheet" href="{% static 'blog/css/custom.css' %}">
    <link rel="stylesheet" href="{% static 'blog/css/friendly.css' %}">
    <link rel="stylesheet" href="{% static 'blog/css/autoc.css' %}">
    <link rel="stylesheet" href="{% static 'blog/css/jupe.css' %}">
    <!-- js -->
    <script src="{% static 'blog/js/jquery-2.1.3.min.js' %}"></script>
    <script src="{% static 'blog/js/bootstrap.min.js' %}"></script>
    <script src="{% static 'blog/js/pace.min.js' %}"></script>
    <script src="{% static 'blog/js/modernizr.custom.js' %}"></script>
    <script src="{% static 'blog/js/ehco.js' %}"></script>
    <script src="{% static 'blog/js/autoc.js' %}"></script>
</head>

<body>
    <div class="container">
        <audio id="music2" src="{% static 'blog/media/bgm.mp3' %}"loop="loop">你的浏览器不支持audio标签。</audio>

        <header id="site-header">
            <div class="row">
                <div class="col-md-4 col-sm-5 col-xs-8">
                    <div class="logo">
                        <h1><a href="{% url 'blog:index' %}"><b>我Accelerator</b></a></h1>
                    </div>
                </div>
                <!-- col-md-4 -->
                <div class="col-md-8 col-sm-7 col-xs-4">
                    <nav class="main-nav" role="navigation">
                        <div class="navbar-header">
                            <button type="button" id="trigger-overlay" class="navbar-toggle">
    								<span class="ion-navicon"></span>
  								</button>
                        </div>

                        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                            <ul class="nav navbar-nav navbar-right">
                                <li class="cl-effect-8"><a href="/" data-hover="Home">Home</a></li>
                                <li class="cl-effect-8"><a href="/about/" data-hover="Home">About</a></li>
                                <li class="cl-effect-8">
                                    <a type="button" href="javascript:playPause();">🎵 开/关</a>

                                </li>
                            </ul>
                        </div>
                        <!-- /.navbar-collapse -->

                    </nav>
                    <div id="header-search-box">
                        <a id="search-menu" href="#"><span id="search-icon" class="ion-ios-search-strong"></span></a>
                        <div id="search-form" class="search-form">

                            <form role="search" method="get" id="searchform" action="{% url 'haystack_search' %}">
                                {% csrf_token %}
                                <input type="search" name='q' placeholder="搜索" required>
                                <button type="submit"><span class="ion-ios-search-strong"></span></button>

                            </form>
                        </div>
                    </div>
                </div>
                <!-- col-md-8 -->
            </div>
        </header>
    </div>

    <div class="content-body">
        <div class="container">
            <div class="row">
                <main class="col-md-8">

                    {% block main %} {% endblock main %}

                </main>

                <aside class="col-md-4">
                    <div class="widget widget-recent-posts">
                        <h3 class="widget-title">最近更新的文章</h3>
                        {% get_recent_posts as recent_post_list %}
                        <ul>
                            {% for post in recent_post_list %}
                            <li>
                                <a href="{{ post.get_absolute_url}}">{{ post.title }}</a>
                            </li>
                            {% endfor %}
                        </ul>
                    </div>
                    <div class="widget widget-archives">
                        <h3 class="widget-title">归档</h3>
                        {% archives as archives_list %}
                        <ul>
                            {% for date in archives_list %}
                            <li>
                                <a href="{% url 'blog:archives' date.year date.month %}">{{ date.year }} 年 {{ date.month }} 月 </a>
                            </li>
                            {% endfor %}
                        </ul>
                    </div>

                    <div class="widget widget-category">
                        <h3 class="widget-title">分类</h3>
                        {% get_categories as category_list %}
                        <ul>
                            {% for category in category_list %}
                            <li>
                                <a href="{% url 'blog:category' category.pk %}">{{ category.name }}</a>
                            </li>
                            {% endfor %}
                        </ul>
                    </div>

                    <div class="widget widget-tag-cloud">
                        <h3 class="widget-title">标签云</h3>
                        {% get_tags as tag_list %}
                        <ul>
                            {% for tag in tag_list %}
                            <li>
                                <a href="{% url 'blog:tag' tag.pk %}">{{ tag.name }}</a>
                            </li>
                            {% empty %} 暂无标签！ {% endfor %}
                        </ul>
                    </div>
                </aside>
            </div>
        </div>
    </div>



    <!-- Mobile Menu -->
    <div class="overlay overlay-hugeinc">
        <button type="button" class="overlay-close"><span class="ion-ios-close-empty"></span></button>
        <nav>
            <ul>
                <li><a href="/" data-hover="Home">Home</a></li>
                <li><a href="/about/" data-hover="Home">About</a></li>
            </ul>
        </nav>
    </div>


    <script src="{% static 'blog/js/script.js' %}"></script>
    <script type="text/javascript">
        new AutocJS({
            article: '#needtoc',
            //selector: 'h1',
            // 不配置 selector 属性，即使用默认选择器
            title: '文章目录',
        });
    </script>

</body>

</html>
